!
!  Copyright (C) 2013, Northwestern University and Argonne National Laboratory
!  See COPYRIGHT notice in top-level directory.
!
! $Id$
!

!
! Use for logging error messages
!
        subroutine error(msg)
        use pnetcdf
        implicit        none
        character(LEN=*)   msg
#include "tests.inc"

        nfails = nfails + 1
        if (nfails .le. max_nmpt) print *, msg
        end


!
! Use for logging error conditions
!
        subroutine errori(msg, i)
        use pnetcdf
        implicit        none
        character(LEN=*)   msg
        integer         i
#include "tests.inc"

        nfails = nfails + 1
        if (nfails .le. max_nmpt) print *, msg, i
        end


!
! Use for logging error conditions
!
        subroutine errord(msg, d)
        use pnetcdf
        implicit        none
        character(LEN=*)   msg
        doubleprecision d
#include "tests.inc"

        nfails = nfails + 1
        if (nfails .le. max_nmpt) print *, msg, d
        end


!
! Use for logging error conditions
!
        subroutine errorc(msg, string)
        use pnetcdf
        implicit        none
        character(LEN=*)   msg
        character(LEN=*)   string
#include "tests.inc"

        nfails = nfails + 1
        if (nfails .le. max_nmpt) print *, msg, &
            trim(string)
        end


!
! Use for logging error conditions
!
        subroutine errore(msg, err)
        use pnetcdf
        implicit        none
        character(LEN=*)   msg
        integer         err
#include "tests.inc"

        nfails = nfails + 1
        call errorc(msg, nf90mpi_strerrno(err))
        end
